Skip to content

chore: tooling migration and dependency updates#123

Merged
marsidev merged 19 commits intomainfrom
feat/docs
Mar 28, 2026
Merged

chore: tooling migration and dependency updates#123
marsidev merged 19 commits intomainfrom
feat/docs

Conversation

@marsidev
Copy link
Copy Markdown
Owner

@marsidev marsidev commented Mar 20, 2026

Summary

Replaces ESLint/Prettier with Oxlint/Oxfmt for 50-100x faster linting/formatting, migrates to TypeScript v7 (Go), consolidates DX with unified check/fix scripts, updates all dependencies to fix security vulnerabilities, and migrates library build from tsup to tsdown.

Changes

🚀 Tooling Migration

  • Replaced ESLint + Prettier → Oxlint + Oxfmt
    • Oxlint v1.57.0 (linter)
    • Oxfmt v0.42.0 (formatter)
    • 50-100x faster performance
  • Configs: Migrated to TypeScript configs
    • .eslintrc.jsonoxlint.config.ts
    • .prettierrc.mjsoxfmt.config.ts
  • Removed: packages/eslint-config-custom package entirely
  • Removed: lint-staged dependency (no longer needed)

⚡ TypeScript v7 (Go Implementation)

  • Added @typescript/native-preview (TS v7 dev preview)
  • Added oxlint-tsgolint for type-aware linting
  • Enabled options.typeAware: true in Oxlint config
  • Renamed all type-check scripts to typecheck for consistency

🔒 Security Fixes

  • jsdom: 28.0.0 → 29.0.1 (fixes undici vulnerabilities - 3 high, 3 moderate)
  • next: 16.1.6 → 16.2.1 (fixes 4 security advisories)
  • All vulnerabilities resolved - pnpm audit now shows 0 issues

📦 Dependency Updates
Updated 17+ packages across the monorepo:

  • @antfu/ni: 28.2.0 → 30.0.0
  • @playwright/test & playwright: 1.58.1 → 1.58.2
  • @types/react: 19.2.10 → 19.2.14
  • @types/node: 25.2.0 → 25.5.0
  • pnpm: 10.28.2 → 10.33.0
  • @typescript/native-preview: dev.20260320.1 → dev.20260325.1
  • vitest: 4.0.18 → 4.1.1
  • bumpp: 10.4.0 → 11.0.1
  • lucide-react: 0.563.0 → 1.6.0 (breaking: brand icons removed)
  • jotai: 2.17.0 → 2.19.0
  • tailwindcss: 4.1.18 → 4.2.2
  • autoprefixer: 10.4.24 → 10.4.27
  • postcss: 8.5.6 → 8.5.8

📚 Library Build Migration (tsup → tsdown)

  • Replaced tsup with tsdown (Rolldown-based library bundler)
  • Performance: Build time reduced from ~1.1s to ~458ms (2.3x faster)
  • Features gained:
    • Built-in gzip size reporting
    • Smarter defaults (treeshaking enabled)
    • Future-proof (official Rolldown project)
  • Config: Added tsdown.config.ts with ESM output
  • Removed: tsup.config.ts and tsup dependency

📝 Script Improvements

pnpm check   # NEW: runs lint:check + format:check + typecheck
pnpm fix     # NEW: runs lint + format (auto-fix everything)

🔧 CI Optimization

  • Merged 3 jobs → 1 job: lint + format + type-check now run as single check job
  • Reduces redundant builds and job startup overhead
  • Total CI jobs: 5 → 3 (40% reduction)

🎯 DX Enhancements

  • Created CONTRIBUTING.md with full development guide
  • Updated VS Code settings with unwanted recommendations for old extensions
  • Updated pre-commit hook: pnpm check (validates all files)

Performance Impact

Tool Before After Improvement
Linting ~5-10s 79ms ~100x faster
Formatting ~8-10s 278ms ~30x faster
Type checking tsc tsgo Native Go
Library build ~1.1s 458ms ~2.3x faster

Files Changed

  • .github/workflows/ci.yml - Optimized CI workflow
  • package.json - New scripts, updated deps
  • oxlint.config.ts - New linter config
  • oxfmt.config.ts - New formatter config
  • CONTRIBUTING.md - New contributor guide
  • .vscode/extensions.json - Updated recommendations
  • packages/lib/package.json - Updated scripts & dependencies
  • packages/lib/tsdown.config.ts - NEW: tsdown configuration
  • packages/lib/tsup.config.ts - REMOVED: tsup configuration
  • demos/nextjs/package.json - Updated scripts & dependencies
  • demos/nextjs/src/components/header.tsx - Fixed lucide-react breaking change
  • pnpm-lock.yaml - Updated lockfile

Breaking Changes

Library: None - No runtime changes, no API changes.

Demo App: lucide-react v1.6.0 removed brand icons (including GithubIcon). Replaced with inline SVG in header component.

Testing

  • pnpm check passes
  • pnpm fix works correctly
  • Library builds successfully (pnpm lib:build)
  • All tests pass (pnpm test)
  • CI workflow validated
  • Pre-commit hooks tested
  • pnpm audit shows 0 vulnerabilities
  • tsdown build verified (faster, gzip reporting)

Migration for Contributors

Existing contributors need to:

  1. Install the Oxc VS Code extension
  2. Run pnpm install to get new dependencies
  3. Use pnpm check instead of individual commands

Add structured AI agent skills to help coding assistants use react-turnstile correctly:

- 5 comprehensive skills: basic-setup, widget-customization, nextjs-ssr, multiple-widgets, token-lifecycle
- Domain map with 8 failure modes extracted from GitHub issues and maintainer interviews
- CI workflows for skill validation and stale checking
- Version bumping now includes skill files via bumpp config
@codesandbox
Copy link
Copy Markdown

codesandbox bot commented Mar 20, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@docs-page
Copy link
Copy Markdown

docs-page bot commented Mar 20, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/marsidev/react-turnstile~123

Documentation is deployed and generated using docs.page.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-turnstile Ready Ready Preview, Comment Mar 28, 2026 3:20am

- Add pnpm check (runs lint:check + format:check + typecheck)
- Add pnpm fix (runs lint + format)
- Rename type-check scripts to typecheck for consistency
- Update CI to use single check job instead of 3 separate jobs
- Remove lint-staged (no longer needed with fast oxlint/oxfmt)
- Update pre-commit hook to run full pnpm check
- Add unwantedRecommendations to VS Code config
Security fixes:

- jsdom: 28.0.0 → 29.0.1 (fixes undici vulnerabilities)

- next: 16.1.6 → 16.2.1 (fixes Next.js security advisories)

Package updates:

- @antfu/ni: 28.2.0 → 30.0.0

- @playwright/test: 1.58.1 → 1.58.2

- playwright: 1.58.1 → 1.58.2

- @types/react: 19.2.10 → 19.2.14

- @types/node: 25.2.0 → 25.5.0

- oxlint: 1.56.0 → 1.57.0

- oxfmt: 0.41.0 → 0.42.0

- oxlint-tsgolint: 0.17.1 → 0.17.4

- pnpm: 10.28.2 → 10.33.0

- @typescript/native-preview: dev.20260320.1 → dev.20260325.1

- vitest: 4.0.18 → 4.1.1

- bumpp: 10.4.0 → 11.0.1

- lucide-react: 0.563.0 → 1.6.0

- jotai: 2.17.0 → 2.19.0

- tailwindcss/postcss: 4.1.18 → 4.2.2

- autoprefixer: 10.4.24 → 10.4.27

- postcss: 8.5.6 → 8.5.8

Breaking changes handled:

- Replaced lucide-react GithubIcon with inline SVG
Replaced tsup with tsdown for faster builds:

- Build time: ~1.1s → ~458ms (2.3x faster)

- Uses Rolldown (Rust-based bundler)

- Built-in gzip size reporting

- Maintains same output format (.js/.d.ts)

Changes:

- Removed tsup dependency and config

- Added tsdown dependency and config

- Updated build scripts

- Preserved backward compatible output
Changes:

- CONTRIBUTING.md: Changed 'tsup' to 'tsdown' in dev server description

- Root package.json: Removed obsolete tsup>rollup override

- packages/lib/package.json: Added typescript devDependency

The typescript package is required by tsdown/rolldown-plugin-dts for generating .d.ts declaration files.
@marsidev marsidev marked this pull request as ready for review March 25, 2026 19:19
Changes:

- Remove duplicate JSX/JS code examples

- Keep only TypeScript examples with proper types

- Apply consistent formatting (double quotes, semicolons)

- Remove unnecessary <CodeGroup> wrappers

- Update 12 documentation files
@marsidev marsidev changed the title Docs, skills and more chore: tooling migration and dependency updates Mar 28, 2026
@marsidev marsidev merged commit f623195 into main Mar 28, 2026
6 checks passed
@marsidev marsidev deleted the feat/docs branch March 28, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant